package com.ys.entity.mall;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Table;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="TM_Goods", catalog="Id")
public class TmGoods extends BaseEntity<TmGoods> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="CateId", nameJava="cateId", typeDataBase="bigint")
	private Long cateId;
	@YsField(nameDataBase="CateName", nameJava="cateName", typeDataBase="varchar")
	private String cateName;
	@YsField(nameDataBase="Code", nameJava="code", typeDataBase="varchar")
	private String code;
	@YsField(nameDataBase="Name", nameJava="name", typeDataBase="varchar")
	private String name;
	@YsField(nameDataBase="Img", nameJava="img", typeDataBase="varchar")
	private String img;
	@YsField(nameDataBase="Detail", nameJava="detail", typeDataBase="text")
	private String detail;
	@YsField(nameDataBase="SortNo", nameJava="sortNo", typeDataBase="int")
	private Integer sortNo;
	@YsField(nameDataBase="Amount", nameJava="amount", typeDataBase="decimal")
	private BigDecimal amount;
	@YsField(nameDataBase="StockNum", nameJava="stockNum", typeDataBase="int")
	private Integer stockNum;
	@YsField(nameDataBase="ValidDays", nameJava="validDays", typeDataBase="int")
	private Integer validDays;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public TmGoods setId(Long id) {
		this.id = id;
		return this;
	}
	public Long getCateId() {
		return cateId;
	}
	public TmGoods setCateId(Long cateId) {
		this.cateId = cateId;
		return this;
	}
	public String getCateName() {
		return cateName;
	}
	public TmGoods setCateName(String cateName) {
		this.cateName = cateName;
		return this;
	}
	public String getCode() {
		return code;
	}
	public TmGoods setCode(String code) {
		this.code = code;
		return this;
	}
	public String getName() {
		return name;
	}
	public TmGoods setName(String name) {
		this.name = name;
		return this;
	}
	public String getImg() {
		return img;
	}
	public TmGoods setImg(String img) {
		this.img = img;
		return this;
	}
	public String getDetail() {
		return detail;
	}
	public TmGoods setDetail(String detail) {
		this.detail = detail;
		return this;
	}
	public Integer getSortNo() {
		return sortNo;
	}
	public TmGoods setSortNo(Integer sortNo) {
		this.sortNo = sortNo;
		return this;
	}
	public BigDecimal getAmount() {
		return amount;
	}
	public TmGoods setAmount(BigDecimal amount) {
		this.amount = amount;
		return this;
	}
	public Integer getStockNum() {
		return stockNum;
	}
	public TmGoods setStockNum(Integer stockNum) {
		this.stockNum = stockNum;
		return this;
	}
	public Integer getValidDays() {
		return validDays;
	}
	public TmGoods setValidDays(Integer validDays) {
		this.validDays = validDays;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public TmGoods setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public TmGoods setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public TmGoods setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static TmGoods tmGoods(
		Long cateId,
		String cateName,
		String code,
		String name,
		String img,
		String detail,
		Integer sortNo,
		BigDecimal amount,
		Integer stockNum,
		Integer validDays,
		Integer status
			) {
		TmGoods entity = new TmGoods();
		entity.setCateId(cateId);
		entity.setCateName(cateName);
		entity.setCode(code);
		entity.setName(name);
		entity.setImg(img);
		entity.setDetail(detail);
		entity.setSortNo(sortNo);
		entity.setAmount(amount);
		entity.setStockNum(stockNum);
		entity.setValidDays(validDays);
		entity.setStatus(status);
		return entity;
	}
}